package ${package.QueryResponse};

import com.fasterxml.jackson.annotation.JsonFormat;
import com.pine.common.util.time.TimeUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * ${table.comment!}查询响应体
 * </p>
 *
 * @author ${author}
 * @since ${date}
 */
@Data
@Schema(title = "${QueryResponseName}", description = "${table.comment!}查询响应体")
public class ${QueryResponseName} implements Serializable {

    @Serial
    private static final long serialVersionUID = ${serialVersionUIDList[4]}L;

<#-- ----------  BEGIN 字段循环遍历  ---------->
<#list QueryResponseFields as field>
    <#if field.enum>
    /**
     * ${field.comment}
     */
    @Schema(title = "${field.propertyName}", description = "${field.comment}")
    private ${field.propertyType} ${field.propertyName};

    /**
     * ${field.comment}-中文描述
     */
    @Schema(title = "${field.propertyName}", description = "中文描述：${field.comment}")
    private String ${field.propertyName}Desc;

    <#elseif field.date>
    /**
     * ${field.comment}-时间格式（yyyy-MM-dd HH:mm:ss）
     */
    @JsonFormat(pattern = TimeUtil.DEFAULT_DATE_TIME_PATTERN, timezone = TimeUtil.GMT_8)
    @Schema(title = "${field.propertyName}", description = "${field.comment}-时间格式（yyyy-MM-dd HH:mm:ss）")
    private LocalDateTime ${field.propertyName};

    <#else>
    /**
     * ${field.comment}
     */
    @Schema(title = "${field.propertyName}", description = "${field.comment}")
    private ${field.propertyType} ${field.propertyName};

    </#if>
</#list>
<#-- ----------  END 字段循环遍历  ---------->
}
